package com.indeep.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.indeep.user.mapper.po.AppVxAuthPO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface AppVxAuthMapper extends BaseMapper<AppVxAuthPO> {
    
    @Insert("insert into app_vx_auth (openid, access_token, refresh_token, unionid, update_time, create_time) " +
            "values (#{openid} ,#{accessToken} ,#{refreshToken} ,#{unionid}, now(), now() )" +
            "on duplicate key update " +
            "   access_token = #{accessToken} , " +
            "   refresh_token = #{refreshToken} , " +
            "   unionid = #{unionid} , " +
            "   update_time = now() ")
    boolean insertOrUpdate(AppVxAuthPO appVxAuthDO);
}
